package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.BuildingDao;
import pojo.Building;
import service.BuildingManager;

@Service
public class BuildingManagerImpl implements BuildingManager {

	@Autowired
	private BuildingDao buildingDao;
	
	@Transactional
	@Override
	public Building addInfo(Building info) {
		
		return buildingDao.addInfo(info);
	}

	@Transactional
	@Override
	public void addInfoList(List<Building> infoList) {
		buildingDao.addInfoList(infoList);
		
	}

	@Transactional
	@Override
	public Building getResult(Building param) {
		
		return buildingDao.getResult(param);
	}

	@Transactional
	@Override
	public List<Building> getResults(String like) {
		
		return buildingDao.getResults(like);
	}

	@Transactional
	@Override
	public boolean updateInfo(Building info) {
		
		return buildingDao.updateInfo(info);
	}

	@Transactional
	@Override
	public boolean deleteInfo(Building info) {
		
		return buildingDao.deleteInfo(info);
	}

}
